export default {
    cardShow: state => state.cardShow,
    currentTime: state => state.currentTime,
    duration: state => state.duration,
    percent: state => state.percent,
    currentLyric: state => state.currentLyric,
    currentLineNum: state => state.currentLineNum,
    playingLyric: state => state.playingLyric,
    lyric: state => state.lyric,
    volume: state => state.volume,
    userInfo: state => state.userInfo,
    online: state => state.online,
    songInfo: state => {
        const url = 'https://music.163.com/song/media/outer/url?id='
        state.songInfo.playUrl = url + state.songInfo.id
        return state.songInfo
    },
    songOrderList: state => state.songOrderList,
    chatList: state => {
        let data = state.chatList
        if (data.length > 300) {
            data = data.slice(data.length - 300)
        }
        return data
    },
}